<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input id='text' type="text" v-model='name'>
        <div id="show" v-text='name'></div>
        <div v-text='age'></div>
    </div>
</body>
<script type="module">
    import Zvue from './Zvue2.js'
    new Zvue({
        data:{
            name:"张三",
            age:18
        },
        el:'#app'
    })
    // let obj = {}
    // Object.defineProperty(obj,'name',{
    //     get:function(){
    //         return name
    //     },
    //     set:function(value){
    //         document.getElementById('text').value = value;
    //         document.getElementById('show').innerHTML = value;
    //     }
    // })
    // let  input = document.getElementById('text');
    // input.addEventListener('input', function (e) {
    //     let  text = e.target.value;
    //     obj.name = text;
    // })
</script>
</html>